@extends('layouts.app')

@section('title','CreateMaster')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2 create-question">
                <div class="panel panel-default">
                    <div class="panel-heading">添加大师</div>
                    <div class="panel-body">
                            {!! Form::open(['route' => 'master.store', 'files' => true]) !!}
                            {{ csrf_field() }}
                            <div class="form-group{{ $errors->has('master_name')?'has-error':'' }}">
                                {!! Form::label('master_name','大师名')!!}
                                {!! Form::text('master_name',null,['class'=>'form-control'])!!}
                                @if ($errors->has('master_name'))
                                    <span class="help-block">
						                <strong>{{ $errors->first('master_name') }}</strong>
						            </span>
                                @endif
                            </div>
                            <div class="form-group">
                                {!! Form::label('master_avatar','大师头像')!!}
                                <div class="input-group">
                                    {!! Form::file('master_avatar') !!}
                                    @if ($errors->has('master_avatar'))
                                        <div class="help-block">
                                            <strong>{{ $errors->first('master_avatar') }}</strong>
                                        </div>
                                    @endif
                                </div>
                            </div>
                            <div class="form-group{{ $errors->has('master_intro')?'has-error':'' }}">
                                {!! Form::label('master_intro','个人简介') !!}
                                <div class="input-group">
                                {!! Form::textarea('master_intro',null,['class'=>'form-control']) !!}
                                @if ($errors->has('master_intro'))
                                    <span class="help-block">
				                        <strong>{{ $errors->first('master_intro') }}</strong>
				                    </span>
                                @endif
                                </div>
                            </div>

                            {!! Form::submit('添加大师',['class'=>"btn btn-success"]); !!}
                            {!! Form::close() !!}
                    </div>
                    <div id="debug"></div>
                </div>
            </div>
        </div>
    </div>
@endsection